package com.kingyun.gpsinspection.purificationservice.facade.service.jsm.workcellinfo;

import com.alibaba.fastjson.JSONObject;
import com.kingyun.gpsinspection.purificationservice.facade.model.jsm.*;

import java.math.BigDecimal;
import java.util.Map;


/**
 * 文档配置service类
 * Created by jiangjx on 2017/1/4.
 * modify by huangxueqian 2017/02/28
 */
public interface JsmIRelatedDocService {

    /**
     * 根据操作单元ID查询出关联文档列表
     * @param relatedDoc
     * @param isStatus 当前状态{modify , add  , details}
     */
    JSONObject loadTable(RelatedDoc relatedDoc, String isStatus) throws Exception;
    /**
     * 删除文档配置
     * created by jiangjx
     * @param cellRelatedDocId 文档关联
     */
    Integer delDocTable(String cellRelatedDocId, Employee employee) throws Exception;

    /**
     * 保存文档配置
     * created by jiangjx
     *
     * @param relatedDocVo 新增数据封装类
     */
    Integer saveDocInfo(RelatedDocVo relatedDocVo, Employee employee) throws Exception;

    /**
     * 操作单元 或者 一站一案
     * 文档配置版本复制成新的版本
     * @param version 当前新增版本信息
     * @param isWorkCell  是否是操作单元 或者 一站一案
     * @oldVersion 当前操作单元  或者 一站一案在用版本号
     */
    Map<String, Object> cloneDoc(Version version, boolean isWorkCell, BigDecimal oldVersion, Employee employee) throws Exception;

    /**
     * @param fromWorkCellInfo   操作单元
     * @param toWorkCellInstance 一站一案
     */
    Map<String, Object> cloneDoc(WorkCellInfo fromWorkCellInfo, WorkCellInstance toWorkCellInstance, Employee employee) throws Exception;

}
